
class AdminController {
	
	def beforeInterceptor = [action:this.&auth]
	
	def auth(){
		if (!session.user){
			redirect(controller:"user", action:"login")
			return false
		}
		
		if (!session.user.admin){
			flash.message = "Get out of here, homewrecker."
			redirect(controller:"race", action:"list")
			return false
		}
	}
	
	def index = {}

}
